6 int di
[] = { 0, -1, 0};
7 int dj
[] = { -1, 0, 1};
8 string dir
[] = {"left", "forth", "right"};
12 string route
= "@IEHOVA#";
22 for (int i
=0; i
<r
; ++i
){
23 for (int j
=0; j
<c
; ++j
){
25 if (g
[i
][j
] == '@') start
= make_pair(i
,j
);
32 for (int k
= 1; k
< 8; ++k
){
33 for (int l
= 0; l
< 3; ++l
){
36 if (0 <= ni
&& ni
< r
&& 0 <= nj
&& nj
< c
&&
37 g
[ni
][nj
] == route
[k
]){